package com.example.sprintbootarithmetic.DataStructure.stack;

public class Stack {
    public int maxsize;
    public int[] num;
    public int top;

    public int getMaxsize() {
        return maxsize;
    }

    public void setMaxsize(int maxsize) {
        this.maxsize = maxsize;
    }

    public int getTop() {
        return top;
    }

    public void setTop(int top) {
        this.top = top;
    }

    //初始化数组大小
    public Stack(int maxsize) {
        this.top = -1;
        this.maxsize = maxsize;
        num = new int[maxsize];
    }
}
